package com.meilingcloud.biobank.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 样本 对象 bank_sample
 *
 * @author chenl
 * @date 2021-03-08
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("bank_sample")
public class Sample implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 样本ID
     */
    @TableId(value = "samp_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sampId;

    /**
     * 样本源ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sampSourceId;

    /**
     * 样本类型ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sampTypeId;

    /**
     * 样本编号
     */
    private String sampCode;

    /**
     * 样本量
     */
    private BigDecimal sampQuantity;

    /**
     * 样本单位
     */
    private String sampUnit;

    /**
     * 复份数量
     */
    private Integer sampBackupCount;

    /**
     * 删除标志
     */
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
